home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 63.5 KB | 2,343 lines |
- diff -rc gcc-2.5.0/bc-emit.c /net/acae127/home/bammi/usr2/gcc/bc-emit.c
- *** gcc-2.5.0/bc-emit.c Tue Oct 12 20:16:34 1993
- --- /net/acae127/home/bammi/usr2/gcc/bc-emit.c Tue Oct 26 20:23:08 1993
- ***************
- *** 223,229 ****
- --- 223,234 ----
- seg->data = xrealloc (seg->data, seg->alloc);
- }
-
- + #ifdef atarist
- + /* figure out later where memset dissappeared to in gnu.olb */
- + bzero (seg->data + seg->size, size);
- + #else
- memset (seg->data + seg->size, 0, size);
- + #endif
- seg->size += size;
- }
-
- diff -rc gcc-2.5.0/c-lex.c /net/acae127/home/bammi/usr2/gcc/c-lex.c
- *** gcc-2.5.0/c-lex.c Wed Sep 29 01:42:10 1993
- --- /net/acae127/home/bammi/usr2/gcc/c-lex.c Tue Oct 26 08:21:29 1993
- ***************
- *** 473,484 ****
- --- 473,486 ----
- case '\r':
- /* ANSI C says the effects of a carriage return in a source file
- are undefined. */
- + #ifndef atarist /* but not on an atarist, though hopefully we should'nt see it */
- if (pedantic && !newline_warning)
- {
- warning ("carriage return in source file");
- warning ("(we only warn about the first carriage return)");
- newline_warning = 1;
- }
- + #endif
- c = getc (finput);
- break;
-
- diff -rc gcc-2.5.0/calls.c /net/acae127/home/bammi/usr2/gcc/calls.c
- *** gcc-2.5.0/calls.c Fri Oct 8 18:26:59 1993
- --- /net/acae127/home/bammi/usr2/gcc/calls.c Tue Oct 26 08:21:38 1993
- ***************
- *** 2099,2104 ****
- --- 2099,2110 ----
-
- argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
-
- + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
- + #ifdef ENCODE_SECTION_INFO
- + /* mark it as a function (to be in the text section that is) */
- + SYMBOL_REF_FLAG (fun) = 1;
- + #endif
- +
- INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
-
- args_size.constant = 0;
- diff -rc gcc-2.5.0/cccp.c /net/acae127/home/bammi/usr2/gcc/cccp.c
- *** gcc-2.5.0/cccp.c Wed Oct 20 19:12:25 1993
- --- /net/acae127/home/bammi/usr2/gcc/cccp.c Tue Oct 26 20:31:18 1993
- ***************
- *** 77,82 ****
- --- 77,83 ----
- #include <stdio.h>
- #include <signal.h>
-
- + #ifndef atarist
- #ifndef VMS
- #ifndef USG
- #include <sys/time.h> /* for __DATE__ and __TIME__ */
- ***************
- *** 86,95 ****
- --- 87,110 ----
- #include <fcntl.h>
- #endif /* USG */
- #endif /* not VMS */
- + #endif /* not atarist */
-
- /* This defines "errno" properly for VMS, and gives us EACCES. */
- #include <errno.h>
-
- + /* atarist specific defs and includes */
- + #ifdef atarist
- + #include <time.h>
- + #include <file.h>
- + #include <string.h>
- + #include <stddef.h>
- +
- + long _stksize = -1L; /* want big stack cause include files
- + get alloca'ed there */
- +
- + #define read(fd,buf,size) _text_read(fd,buf,size)
- + #endif /* atarist */
- +
- /* VMS-specific definitions */
- #ifdef VMS
- #include <time.h>
- ***************
- *** 979,984 ****
- --- 994,1020 ----
- /* Nonzero means -I- has been seen,
- so don't look for #include "foo" the source-file directory. */
- static int ignore_srcdir;
- +
- + #ifdef atarist
- + /* the following dingus is used in place of some calls to bcopy,
- + to ensure that backslashes get properly slashified when getting
- + shoved into strings. Note that it returns the new pointer!!
- + There ought to be a better way... */
- +
- + U_CHAR * slashifying_bcopy(from_buf, to_buf, nbytes)
- + U_CHAR * from_buf, * to_buf;
- + int nbytes;
- + {
- + for ( ; nbytes > 0 ; )
- + {
- + if(*from_buf == '\\')
- + *to_buf++ = '\\';
- + *to_buf++ = *from_buf++;
- + nbytes--;
- + }
- + return(to_buf);
- + }
- + #endif /* atarist */
-
- int
- main (argc, argv)
- ***************
- *** 1021,1026 ****
- --- 1057,1068 ----
- /* Target-name to write with the dependency information. */
- char *deps_target = 0;
-
- + #ifdef atarist
- + #define GCC_INCLUDE_DIR "./"
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + #endif
- +
- #ifdef RLIMIT_STACK
- /* Get rid of any avoidable limit on stack size. */
- {
- ***************
- *** 1343,1352 ****
- --- 1385,1400 ----
- break;
-
- case 'v':
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
- + version_string, PatchLevel);
- + #else
- fprintf (stderr, "GNU CPP version %s", version_string);
- #ifdef TARGET_VERSION
- TARGET_VERSION;
- #endif
- + #endif
- fprintf (stderr, "\n");
- verbose = 1;
- break;
- ***************
- *** 1480,1485 ****
- --- 1528,1534 ----
- }
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Add dirs from CPATH after dirs from -I. */
- /* There seems to be confusion about what CPATH should do,
- so for the moment it is not documented. */
- ***************
- *** 1489,1494 ****
- --- 1538,1544 ----
- p = (char *) getenv ("CPATH");
- if (p != 0 && ! no_standard_includes)
- path_include (p);
- + #endif
-
- /* Now that dollars_in_ident is known, initialize is_idchar. */
- initialize_char_syntax ();
- ***************
- *** 1607,1614 ****
- { /* read the appropriate environment variable and if it exists
- replace include_defaults with the listed path. */
- char *epath = 0;
- switch ((objc << 1) + cplusplus)
- ! {
- case 0:
- epath = getenv ("C_INCLUDE_PATH");
- break;
- --- 1657,1712 ----
- { /* read the appropriate environment variable and if it exists
- replace include_defaults with the listed path. */
- char *epath = 0;
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + int db_hack = 0;
- + char *e1 = getenv("GNUINC"), *e2 = getenv("GNULIB"),
- + *e3 = getenv("GXXINC");
- +
- +
- + /* Get length of the alloc'ed array. (Yeah I know, I might alloc
- + * a character more than I need but who cares...
- + */
- + if (cplusplus && e3)
- + db_hack += strlen (e3);
- + if (e1)
- + db_hack += strlen (e1) + 1;
- + if (e2)
- + db_hack += strlen (e1) + 1;
- +
- + if (db_hack) {
- + epath = alloca (db_hack + 1);
- + *epath = '\0';
- + db_hack = 0;
- +
- + /* Concatenate the paths together. */
- + if (cplusplus && e3) {
- + strcpy (epath, e3);
- + db_hack = 1;
- + }
- + if (e1) {
- + if (db_hack) {
- + strcat (epath, PATH_SEP_STR);
- + }
- + strcat (epath, e1);
- + db_hack = 1;
- + }
- + if (e2) {
- + if (db_hack) {
- + strcat (epath, PATH_SEP_STR);
- + }
- + strcat (epath, e2);
- + }
- + }
- +
- + #ifdef atarist
- + if (epath)
- + for (e3=epath; *e3; e3++) /* Use one kind of path separator */
- + if (*e3 == ';')
- + *e3 = PATH_SEPARATOR;
- + #endif
- + #else
- switch ((objc << 1) + cplusplus)
- ! {
- case 0:
- epath = getenv ("C_INCLUDE_PATH");
- break;
- ***************
- *** 1621,1627 ****
- case 3:
- epath = getenv ("OBJCPLUS_INCLUDE_PATH");
- break;
- ! }
- /* If the environment var for this language is set,
- add to the default list of include directories. */
- if (epath) {
- --- 1719,1727 ----
- case 3:
- epath = getenv ("OBJCPLUS_INCLUDE_PATH");
- break;
- ! }
- ! #endif
- !
- /* If the environment var for this language is set,
- add to the default list of include directories. */
- if (epath) {
- ***************
- *** 1675,1687 ****
- --- 1775,1797 ----
- if (!no_standard_includes) {
- struct default_include *p = include_defaults;
- char *specd_prefix = include_prefix;
- + #ifdef GCC_INCLUDE_DIR
- char *default_prefix = savestring (GCC_INCLUDE_DIR);
- + #else
- + char *default_prefix = savestring ("./");
- + #endif
- int default_len = 0;
- /* Remove the `include' from /usr/local/lib/gcc.../include. */
- if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
- default_len = strlen (default_prefix) - 7;
- default_prefix[default_len] = 0;
- }
- + #ifdef atarist
- + else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
- + default_len = strlen (default_prefix) - 7;
- + default_prefix[default_len] = 0;
- + }
- + #endif
- /* Search "translated" versions of GNU directories.
- These have /usr/local/lib/gcc... replaced by specd_prefix. */
- if (specd_prefix != 0 && default_len != 0)
- ***************
- *** 1823,1829 ****
- --- 1933,1943 ----
- char *p1 = p;
- /* Discard all directory prefixes from P. */
- while (*p1) {
- + #ifdef atarist
- + if ((*p1 == '/') || (*p1 == '\\'))
- + #else
- if (*p1 == '/')
- + #endif
- p = p1 + 1;
- p1++;
- }
- ***************
- *** 1997,2002 ****
- --- 2111,2117 ----
- return 0;
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Given a colon-separated list of file names PATH,
- add all the names to the search path for include files. */
-
- ***************
- *** 2044,2049 ****
- --- 2159,2165 ----
- p++;
- }
- }
- + #endif /* atarist */
-
- /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
- before main CCCP processing. Name `pcp' is also in honor of the
- ***************
- *** 3230,3235 ****
- --- 3346,3352 ----
- assertions_flag = save_assertions_flag;
- return obuf;
- }
- + /* #endif */
-
- /*
- * Process a # directive. Expects IP->bufp to point after the '#', as in
- ***************
- *** 3692,3699 ****
- --- 3809,3825 ----
-
- if (string)
- {
- + #ifndef atarist
- buf = (char *) alloca (3 + 4 * strlen (string));
- quote_string (buf, string);
- + #else
- + buf = (char *) alloca (16 + strlen (string));
- + {
- + char *tbuf = (char *) alloca (16 + strlen (string));
- + (void) slashifying_bcopy(string, tbuf, strlen(string)+1);
- + sprintf (buf, "\"%s\"", tbuf);
- + }
- + #endif /* atarist */
- }
- else
- buf = "\"\"";
- ***************
- *** 3929,3935 ****
- --- 4055,4066 ----
- dsp[0].next = search_start;
- search_start = dsp;
- #ifndef VMS
- + #ifdef atarist
- + if((ep = rindex(nam, '\\')) == NULL)
- + ep = rindex(nam, '/');
- + #else
- ep = rindex (nam, '/');
- + #endif
- #else /* VMS */
- ep = rindex (nam, ']');
- if (ep == NULL) ep = rindex (nam, '>');
- ***************
- *** 4009,4017 ****
- --- 4140,4162 ----
-
- /* If specified file name is absolute, just open it. */
-
- + #ifdef atarist
- + if ((*fbeg == '\\') || (*fbeg == '/')) {
- + if(fbeg[2] == ':')
- + { /* allow "\D:\xxx" */
- + strncpy (fname, fbeg+1, flen-1);
- + fname[flen-1] = 0;
- + }
- + else
- + { /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
- + strncpy (fname, fbeg, flen);
- + fname[flen] = 0;
- + }
- + #else
- if (*fbeg == '/') {
- strncpy (fname, fbeg, flen);
- fname[flen] = 0;
- + #endif
- if (redundant_include_p (fname))
- return 0;
- if (importing)
- ***************
- *** 4032,4038 ****
- --- 4177,4187 ----
- if (searchptr->fname[0] == 0)
- continue;
- strcpy (fname, searchptr->fname);
- + #ifdef atarist
- + strcat (fname, "\\");
- + #else
- strcat (fname, "/");
- + #endif
- fname[strlen (fname) + flen] = 0;
- } else {
- fname[0] = 0;
- ***************
- *** 4145,4161 ****
-
- if (!no_precomp)
- do {
- sprintf (pcftry, "%s%d", fname, pcfnum++);
-
- pcf = open (pcftry, O_RDONLY, 0666);
- if (pcf != -1)
- {
- struct stat s;
-
- fstat (pcf, &s);
- if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
- || stat_f.st_dev != s.st_dev)
- ! {
- pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
- /* Don't need it any more. */
- close (pcf);
- --- 4294,4352 ----
-
- if (!no_precomp)
- do {
- + #ifdef atarist
- + int numlen;
- + char *dot;
- + char *slash;
- +
- + /* cut extension to 3 chars and dont depend on UNIXMODE */
- + /* this will have to be done when saving precompiled headers, too */
- + /* but as far as I tried, they dont work up to now, anyway (AL) */
- +
- + if( pcfnum>=100 ) numlen=3;
- + else if( pcfnum>=10 ) numlen=2;
- + else numlen=1;
- +
- + dot=strrchr( fname, '.' );
- + if( (slash=strrchr( fname, '/')) && slash>dot )
- + dot=NULL;
- + else
- + if( (slash=strrchr( fname, '\\')) && slash>dot )
- + dot=NULL;
- +
- + if( dot ) {
- + if( strlen(dot)-1>3-numlen ) {
- + sprintf(pcftry, "%.*s%d", strlen(fname)-(strlen(dot)-(4-numlen)),
- + fname, pcfnum++);
- + } else {
- + sprintf(pcftry, "%s%d", fname, pcfnum++);
- + }
- + } else {
- + sprintf( pcftry, "%s.%d", fname, pcfnum++);
- + }
- + #else /* looks like we got a sane filesystem */
- sprintf (pcftry, "%s%d", fname, pcfnum++);
- + #endif
- + #if 0
- + fprintf ( stderr, "trying precompiled file %s.\n", pcftry );
- + #endif
-
- pcf = open (pcftry, O_RDONLY, 0666);
- if (pcf != -1)
- {
- + #ifndef atarist
- + /* dont bother with this on the ST since these field are faked
- + * anyways
- + */
- struct stat s;
-
- fstat (pcf, &s);
- if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
- || stat_f.st_dev != s.st_dev)
- ! #else
- ! if (1)
- ! #endif
- ! {
- pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
- /* Don't need it any more. */
- close (pcf);
- ***************
- *** 7130,7137 ****
- --- 7321,7332 ----
- check_expand (op, len + 1);
- if (op->bufp > op->buf && op->bufp[-1] != '\n')
- *op->bufp++ = '\n';
- + #ifdef atarist
- + op->bufp = slashifying_bcopy (line_cmd_buf, op->bufp, len);
- + #else
- bcopy (line_cmd_buf, op->bufp, len);
- op->bufp += len;
- + #endif
- op->lineno = ip->lineno;
- }
-
- ***************
- *** 8879,8884 ****
- --- 9074,9080 ----
- deps_buffer[deps_size] = 0;
- }
-
- + #if (!(defined(atarist) || defined(atariminix)))
- #if defined(USG) || defined(VMS)
- #ifndef BSTRING
-
- ***************
- *** 8915,8921 ****
- }
- #endif /* not BSTRING */
- #endif /* USG or VMS */
- !
-
- static void
- fatal (str, arg)
- --- 9111,9117 ----
- }
- #endif /* not BSTRING */
- #endif /* USG or VMS */
- ! #endif /* any atari */
-
- static void
- fatal (str, arg)
- diff -rc gcc-2.5.0/config/m68k/m68k.c /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.c
- *** gcc-2.5.0/config/m68k/m68k.c Thu Oct 21 00:26:37 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.c Tue Oct 26 08:23:15 1993
- ***************
- *** 61,67 ****
- void
- finalize_pic ()
- {
- ! if (flag_pic && current_function_uses_pic_offset_table)
- emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
- }
-
- --- 61,67 ----
- void
- finalize_pic ()
- {
- ! if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
- emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
- }
-
- ***************
- *** 214,220 ****
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
- #endif
- }
- ! if (flag_pic && current_function_uses_pic_offset_table)
- {
- #ifdef MOTOROLA
- asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
- --- 214,220 ----
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
- #endif
- }
- ! if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
- {
- #ifdef MOTOROLA
- asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
- ***************
- *** 801,812 ****
- /* First handle a simple SYMBOL_REF or LABEL_REF */
- if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
- {
- if (reg == 0)
- abort ();
-
- ! pic_ref = gen_rtx (MEM, Pmode,
- ! gen_rtx (PLUS, Pmode,
- ! pic_offset_table_rtx, orig));
- current_function_uses_pic_offset_table = 1;
- RTX_UNCHANGING_P (pic_ref) = 1;
- emit_move_insn (reg, pic_ref);
- --- 801,820 ----
- /* First handle a simple SYMBOL_REF or LABEL_REF */
- if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
- {
- + #ifdef LEGITIMATE_BASEREL_OPERAND_P
- + if (LEGITIMATE_BASEREL_OPERAND_P (orig))
- + return orig;
- + #endif
- +
- if (reg == 0)
- abort ();
-
- ! if (flag_pic == 3)
- ! pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
- ! else
- ! pic_ref = gen_rtx (MEM, Pmode,
- ! gen_rtx (PLUS, Pmode,
- ! pic_offset_table_rtx, orig));
- current_function_uses_pic_offset_table = 1;
- RTX_UNCHANGING_P (pic_ref) = 1;
- emit_move_insn (reg, pic_ref);
- ***************
- *** 1851,1856 ****
- --- 1859,1867 ----
- output_address (XEXP (op, 0));
- if (letter == 'd' && ! TARGET_68020
- && CONSTANT_ADDRESS_P (XEXP (op, 0))
- + && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- + && SYMBOL_REF_FLAG (XEXP (op, 0))
- + && !SYMBOL_REF_USED (XEXP (op, 0)))
- && !(GET_CODE (XEXP (op, 0)) == CONST_INT
- && INTVAL (XEXP (op, 0)) < 0x8000
- && INTVAL (XEXP (op, 0)) >= -0x8000))
- ***************
- *** 2158,2163 ****
- --- 2169,2176 ----
- fprintf (file, ":w");
- if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
- fprintf (file, ":l");
- + if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
- + fprintf (file, ":w");
- }
- if (addr != 0 && ireg != 0)
- {
- ***************
- *** 2235,2240 ****
- --- 2248,2265 ----
- fprintf (file, "%d:w", INTVAL (addr));
- #endif
- }
- + else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
- + && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
- + {
- + #ifdef MOTOROLA
- + output_addr_const (file, addr);
- + fputs ("(pc)", file);
- + #else
- + fputs ("pc@(", file);
- + output_addr_const (file, addr);
- + putc (')', file);
- + #endif
- + }
- else
- {
- output_addr_const (file, addr);
- ***************
- *** 2301,2303 ****
- --- 2326,2344 ----
-
- return 0;
- }
- +
- + #ifdef ENCODE_SECTION_INFO
- + /* Does operand (which is a symbolic_operand) live in text space? If
- + so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
- +
- + int
- + read_only_operand (operand)
- + rtx operand;
- + {
- + if (GET_CODE (operand) == CONST)
- + operand = XEXP (XEXP (operand, 0), 0);
- + if (GET_CODE (operand) == SYMBOL_REF)
- + return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
- + return 1;
- + }
- + #endif
- diff -rc gcc-2.5.0/config/m68k/m68k.h /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.h
- *** gcc-2.5.0/config/m68k/m68k.h Tue Sep 21 22:40:16 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.h Tue Oct 26 08:23:16 1993
- ***************
- *** 92,97 ****
- --- 92,103 ----
- /* Use the 68040-only fp instructions (-m68040). */
- #define TARGET_68040_ONLY (target_flags & 01000)
-
- + /* Use PC-relative addressing for refs to read-only data */
- + #define TARGET_PC_REL (target_flags & 02000)
- +
- + /* Use base-relative addressing for refs to data&bss segments */
- + #define TARGET_BASE_REL (target_flags & 04000)
- +
- /* Macro to define tables used to set the flags.
- This is a list in braces of pairs in braces,
- each pair being { "NAME", VALUE }
- ***************
- *** 121,126 ****
- --- 127,136 ----
- { "68030", -01400}, \
- { "68030", 5}, \
- { "68040", 01007}, \
- + { "pcrel", 02000}, \
- + { "nopcrel", -02000}, \
- + { "baserel", 04000}, \
- + { "nobaserel", -04000}, \
- { "68851", 0}, /* Affects *_SPEC and/or GAS. */ \
- { "no-68851", 0}, /* Affects *_SPEC and/or GAS. */ \
- { "68302", 0}, /* Affects *_SPEC and/or GAS. */ \
- ***************
- *** 143,154 ****
- --- 153,166 ----
- if (! TARGET_68020 && flag_pic == 2) \
- error("-fPIC is not currently supported on the 68000 or 68010\n"); \
- SUBTARGET_OVERRIDE_OPTIONS \
- + if (TARGET_BASE_REL) flag_pic = 3; \
- }
- #else
- #define OVERRIDE_OPTIONS \
- { \
- if (! TARGET_68020 && flag_pic == 2) \
- error("-fPIC is not currently supported on the 68000 or 68010\n"); \
- + if (TARGET_BASE_REL) flag_pic = 3; \
- SUBTARGET_OVERRIDE_OPTIONS \
- }
- #endif /* defined SUPPORT_SUN_FPA */
- ***************
- *** 356,361 ****
- --- 368,376 ----
- { \
- if (flag_pic) \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- + /* prevent saving/restoring of the base reg */ \
- + if (flag_pic == 3) \
- + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- }
-
- #else /* defined SUPPORT_SUN_FPA */
- ***************
- *** 380,385 ****
- --- 395,403 ----
- } \
- if (flag_pic) \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- + /* prevent saving/restoring of the base reg */ \
- + if (flag_pic == 3) \
- + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- }
-
- #endif /* defined SUPPORT_SUN_FPA */
- ***************
- *** 1154,1159 ****
- --- 1172,1179 ----
- && LEGITIMATE_BASE_REG_P (XEXP (X, 0)) \
- && GET_CODE (XEXP (X, 1)) == CONST_INT \
- && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000) \
- + || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- + && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
- || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF) \
- || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- diff -rc gcc-2.5.0/config/m68k/m68k.md /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.md
- *** gcc-2.5.0/config/m68k/m68k.md Wed Oct 20 23:59:47 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.md Tue Oct 26 08:23:18 1993
- ***************
- *** 704,716 ****
- {
- if (flag_pic && symbolic_operand (operands[1], SImode))
- {
- ! /* The source is an address which requires PIC relocation.
- ! Call legitimize_pic_address with the source, mode, and a relocation
- ! register (a new pseudo, or the final destination if reload_in_progress
- ! is set). Then fall through normally */
- ! extern rtx legitimize_pic_address();
- ! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
- ! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
- }
- }")
-
- --- 704,721 ----
- {
- if (flag_pic && symbolic_operand (operands[1], SImode))
- {
- ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
- ! if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
- ! #endif
- ! {
- ! /* The source is an address which requires PIC relocation.
- ! Call legitimize_pic_address with the source, mode, and a relocation
- ! register (a new pseudo, or the final destination if reload_in_progress
- ! is set). Then fall through normally */
- ! extern rtx legitimize_pic_address();
- ! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
- ! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
- ! }
- }
- }")
-
- ***************
- *** 4823,4829 ****
- ""
- "
- {
- ! if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
- #else
- --- 4828,4834 ----
- ""
- "
- {
- ! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
- #else
- ***************
- *** 4838,4844 ****
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "! flag_pic"
- "*
- #ifdef MOTOROLA
- return \"jsr %0\";
- --- 4843,4849 ----
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "(! flag_pic || flag_pic == 3)"
- "*
- #ifdef MOTOROLA
- return \"jsr %0\";
- ***************
- *** 4853,4859 ****
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "flag_pic"
- "*
- #ifdef HPUX_ASM
- return \"bsr %0\";
- --- 4858,4864 ----
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "(flag_pic && flag_pic < 3)"
- "*
- #ifdef HPUX_ASM
- return \"bsr %0\";
- ***************
- *** 4878,4884 ****
- ""
- "
- {
- ! if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
- #else
- --- 4883,4889 ----
- ""
- "
- {
- ! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
- #else
- ***************
- *** 4893,4899 ****
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "! flag_pic"
- "*
- #ifdef MOTOROLA
- return \"jsr %1\";
- --- 4898,4904 ----
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "(! flag_pic || flag_pic == 3)"
- "*
- #ifdef MOTOROLA
- return \"jsr %1\";
- ***************
- *** 4908,4914 ****
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "flag_pic"
- "*
- #ifdef HPUX_ASM
- return \"bsr %1\";
- --- 4913,4919 ----
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "(flag_pic && flag_pic < 3)"
- "*
- #ifdef HPUX_ASM
- return \"bsr %1\";
- diff -rc gcc-2.5.0/cp-lex.c /net/acae127/home/bammi/usr2/gcc/cp-lex.c
- *** gcc-2.5.0/cp-lex.c Fri Oct 8 15:01:12 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-lex.c Tue Oct 26 08:25:12 1993
- ***************
- *** 1744,1750 ****
- {
- struct pending_inline *t;
-
- ! t = (struct pending_inline *) obstack_alloc (&inline_text_obstack,
- sizeof (struct pending_inline));
- t->lineno = lineno;
- t->filename = input_filename;
- --- 1744,1750 ----
- {
- struct pending_inline *t;
-
- ! t = (struct pending_inline *) obstack_alloc (&permanent_obstack,
- sizeof (struct pending_inline));
- t->lineno = lineno;
- t->filename = input_filename;
- diff -rc gcc-2.5.0/cp-tree.c /net/acae127/home/bammi/usr2/gcc/cp-tree.c
- *** gcc-2.5.0/cp-tree.c Fri Oct 8 15:02:05 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-tree.c Tue Oct 26 08:25:22 1993
- ***************
- *** 1660,1665 ****
- --- 1660,1666 ----
- print_class_statistics ();
- }
-
- + #ifndef atarist
- /* This is used by the `assert' macro. It is provided in libgcc.a,
- which `cc' doesn't know how to link. Note that the C++ front-end
- no longer actually uses the `assert' macro (instead, it calls
- ***************
- *** 1682,1687 ****
- --- 1683,1689 ----
- fflush (stderr);
- abort ();
- }
- + #endif
-
- /* Return, as an INTEGER_CST node, the number of elements for
- TYPE (which is an ARRAY_TYPE). This counts only elements of the top array. */
- diff -rc gcc-2.5.0/gcc.c /net/acae127/home/bammi/usr2/gcc/gcc.c
- *** gcc-2.5.0/gcc.c Wed Oct 20 19:12:52 1993
- --- /net/acae127/home/bammi/usr2/gcc/gcc.c Tue Oct 26 19:32:43 1993
- ***************
- *** 30,35 ****
- --- 30,44 ----
- Once it knows which kind of compilation to perform, the procedure for
- compilation is specified by a string called a "spec". */
-
- + #ifdef CROSSATARI
- + #ifdef atarist
- + #undef atarist
- + #endif
- + #ifdef atariminix
- + #undef atariminix
- + #endif
- + #endif
- +
- #include <sys/types.h>
- #include <ctype.h>
- #include <signal.h>
- ***************
- *** 40,45 ****
- --- 49,56 ----
- #include "obstack.h"
- #include "gvarargs.h"
- #include <stdio.h>
- + #include <string.h>
- + /* if your supplier still does'nt have string.h, shoot him.. */
-
- #ifndef R_OK
- #define R_OK 4
- ***************
- *** 65,71 ****
- #define NULL_PTR ((GENERIC_PTR)0)
- #endif
-
- ! #ifdef USG
- #define vfork fork
- #endif /* USG */
-
- --- 76,82 ----
- #define NULL_PTR ((GENERIC_PTR)0)
- #endif
-
- ! #if (defined(USG) || defined(atariminix))
- #define vfork fork
- #endif /* USG */
-
- ***************
- *** 97,102 ****
- --- 108,124 ----
- #define PATH_SEPARATOR ':'
- #endif
-
- + #ifdef CROSSATARI
- + #include <ctype.h>
- + #endif
- +
- + #ifdef atarist
- + #include <osbind.h>
- + #include <ctype.h>
- + #include <fcntl.h> /* fgth, for redirection of stderr */
- + long _stksize = 8192;
- + #endif
- +
- #define obstack_chunk_alloc xmalloc
- #define obstack_chunk_free free
-
- ***************
- *** 161,167 ****
- --- 183,191 ----
- pass the compiler in building the list of pointers to constructors
- and destructors. */
-
- + #if (!(defined(CROSSATARI) || defined(atarist)))
- static struct obstack collect_obstack;
- + #endif
-
- extern char *version_string;
-
- ***************
- *** 457,463 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {"-",
- --- 481,487 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {"-",
- ***************
- *** 490,496 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".h", "@c-header"},
- --- 514,520 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".h", "@c-header"},
- ***************
- *** 525,531 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".i", "@cpp-output"},
- --- 549,555 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".i", "@cpp-output"},
- ***************
- *** 536,542 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
- {".ii", "@c++-cpp-output"},
- {"@c++-cpp-output",
- --- 560,566 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
- {".ii", "@c++-cpp-output"},
- {"@c++-cpp-output",
- ***************
- *** 546,559 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }"},
- {".s", "@assembler"},
- {"@assembler",
- ! "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
- {".S", "@assembler-with-cpp"},
- {"@assembler-with-cpp",
- "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
- %{C:%{!E:%eGNU C does not support -C without using -E}}\
- --- 570,586 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }"},
- {".s", "@assembler"},
- {"@assembler",
- ! "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
- {".S", "@assembler-with-cpp"},
- + {".ss", "@assembler-with-cpp"},
- + {".cpp", "@assembler-with-cpp"},
- + {".spp", "@assembler-with-cpp"},
- {"@assembler-with-cpp",
- "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
- %{C:%{!E:%eGNU C does not support -C without using -E}}\
- ***************
- *** 563,569 ****
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
- ! "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".ads", "@ada"},
- --- 590,596 ----
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
- ! "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".ads", "@ada"},
- ***************
- *** 589,594 ****
- --- 616,630 ----
-
- /* Here is the spec for running the linker, after compiling all files. */
-
- + #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
- + static char *link_command_spec =
- + "%{!fsyntax-only: \
- + %{!c:%{!M*:%{!E:%{!S:ld %X %{v} %{G} %{o*} %l\
- + %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
- + %{y*} %{!nostdlib:%S} \
- + %{L*} %o %{!nostdlib:%s %L}\n }}}}}";
- +
- + #else
- /* -u* was put back because both BSD and SysV seem to support it. */
- /* %{static:} simply prevents an error message if the target machine
- doesn't handle -static. */
- ***************
- *** 622,627 ****
- --- 658,664 ----
- %{L*} %D %{T*} %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}";
- #endif
- #endif
- + #endif
-
- /* A vector of options to give to the linker.
- These options are accumulated by -Xlinker and -Wl,
- ***************
- *** 849,854 ****
- --- 886,892 ----
- *argcp = newindex;
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Read compilation specs from a file named FILENAME,
- replacing the default ones.
-
- ***************
- *** 988,993 ****
- --- 1026,1032 ----
-
- return p;
- }
- + #endif /* ataris */
-
- /* Structure to keep track of the specs that have been defined so far. These
- are accessed using %(specname) or %[specname] in a compiler or link spec. */
- ***************
- *** 1104,1109 ****
- --- 1143,1155 ----
- /* Name with which this program was invoked. */
-
- static char *programname;
- +
- + #ifdef atarist
- + /* Flag indicating, that stderr should be redirected for the child
- + processes */
- +
- + unsigned char zflag;
- + #endif
-
- /* Structures to keep track of prefixes to try when looking for files. */
-
- ***************
- *** 1397,1406 ****
- if (base == (char *)0)
- base = "./";
-
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
- strcpy (temp_filename, base);
- ! if (len > 0 && temp_filename[len-1] != '/')
- temp_filename[len++] = '/';
- strcpy (temp_filename + len, "ccXXXXXX");
-
- --- 1443,1463 ----
- if (base == (char *)0)
- base = "./";
-
- + #ifdef atarist
- + {
- + char *newbase = alloca(FILENAME_MAX);
- + dos2unx(base,newbase);
- + base = newbase;
- + }
- + #endif
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
- strcpy (temp_filename, base);
- ! if (len > 0 && (temp_filename[len-1] != '/'
- ! #ifdef atarist
- ! || temp_filename[len-1] != '\\'
- ! #endif
- ! ))
- temp_filename[len++] = '/';
- strcpy (temp_filename + len, "ccXXXXXX");
-
- ***************
- *** 1419,1424 ****
- --- 1476,1482 ----
- use come from an obstack, we don't have to worry about allocating
- space for them. */
-
- + #if (!(defined(CROSSATARI) || defined(atarist)))
- #ifndef HAVE_PUTENV
-
- void
- ***************
- *** 1520,1525 ****
- --- 1578,1584 ----
- obstack_1grow (&collect_obstack, '\0');
- putenv (obstack_finish (&collect_obstack));
- }
- + #endif /* ataris */
-
-
- /* Search for NAME using the prefix list PREFIXES. MODE is passed to
- ***************
- *** 1804,1809 ****
- --- 1863,1869 ----
-
- #else /* not __MSDOS__ */
-
- + #ifndef atarist
- static int
- pexecute (search_flag, program, argv, not_last)
- int search_flag;
- ***************
- *** 1892,1897 ****
- --- 1952,1958 ----
- }
- }
-
- + #endif /* not atarist */
- #endif /* not __MSDOS__ */
- #else /* not OS2 */
-
- ***************
- *** 1922,1937 ****
- {
- char *prog; /* program name. */
- char **argv; /* vector of args. */
- int pid; /* pid of process for this command. */
- };
-
- struct command *commands; /* each command buffer with above info. */
-
- /* Count # of piped commands. */
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- n_commands++;
- !
- /* Get storage for each command. */
- commands
- = (struct command *) alloca (n_commands * sizeof (struct command));
- --- 1983,2003 ----
- {
- char *prog; /* program name. */
- char **argv; /* vector of args. */
- + #ifndef atarist
- int pid; /* pid of process for this command. */
- + #endif
- };
-
- struct command *commands; /* each command buffer with above info. */
-
- + #ifndef atarist
- /* Count # of piped commands. */
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- n_commands++;
- ! #else
- ! n_commands = 1;
- ! #endif
- /* Get storage for each command. */
- commands
- = (struct command *) alloca (n_commands * sizeof (struct command));
- ***************
- *** 1946,1951 ****
- --- 2012,2018 ----
- if (string)
- commands[0].argv[0] = string;
-
- + #ifndef atarist
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- { /* each command. */
- ***************
- *** 1960,1965 ****
- --- 2027,2035 ----
- commands[n_commands].argv[0] = string;
- n_commands++;
- }
- + #else
- + n_commands = 1;
- + #endif
-
- argbuf[argbuf_index] = 0;
-
- ***************
- *** 1975,1983 ****
- --- 2045,2055 ----
- for (j = commands[i].argv; *j; j++)
- fprintf (stderr, " %s", *j);
-
- + #ifndef atarist
- /* Print a pipe symbol after all but the last command. */
- if (i + 1 != n_commands)
- fprintf (stderr, " |");
- + #endif
- fprintf (stderr, "\n");
- }
- fflush (stderr);
- ***************
- *** 1992,2008 ****
- --- 2064,2090 ----
- #endif /* DEBUG */
- }
-
- + #ifndef atarist
- /* Run each piped subprocess. */
-
- last_pipe_input = STDIN_FILE_NO;
- for (i = 0; i < n_commands; i++)
- {
- + #ifndef atariminix
- char *string = commands[i].argv[0];
-
- commands[i].pid = pexecute (string != commands[i].prog,
- string, commands[i].argv,
- i + 1 < n_commands);
-
- + #else
- + extern int execv();
- + char *string = commands[i].argv[0];
- +
- + commands[i].pid = pexecute (execv,
- + string, commands[i].argv,
- + i + 1 < n_commands);
- + #endif
- if (string != commands[i].prog)
- free (string);
- }
- ***************
- *** 2049,2054 ****
- --- 2131,2181 ----
- }
- return ret_code;
- }
- + #else /* atarist */
- + {
- + register int iii;
- + int errfd, oldfd;
- + char **j;
- +
- + execution_count++;
- +
- + if (zflag)
- + {
- + errfd = Fopen("compile.err", 2);
- + if (errfd < __SMALLEST_VALID_HANDLE)
- + errfd = Fcreate("compile.err", 0);
- + else
- + Fseek(0L, errfd, 2);
- + if (errfd >= __SMALLEST_VALID_HANDLE)
- + {
- + oldfd = Fdup (2);
- + Fforce(2, errfd);
- + }
- + else
- + {
- + error("cannot open %s", "compile.err");
- + zflag = 0; /* no redirection */
- + }
- + }
- + for (i = 0; i < n_commands ; i++)
- + {
- + j = commands[i].argv;
- + iii = spawnve(0, j[0], j, NULL);
- + if(iii != 0)
- + break;
- + }
- + if (zflag)
- + {
- + Fforce(2, oldfd);
- + Fclose(oldfd);
- + Fclose(errfd);
- + }
- + if (iii != 0)
- + return -1;
- + else
- + return 0;
- + }
- + #endif /* atarist */
- }
-
- /* Find all the switches given to us
- ***************
- *** 2112,2117 ****
- --- 2239,2245 ----
-
- /* Set up the default search paths. */
-
- + #ifndef CROSSATARI
- if (gcc_exec_prefix)
- {
- add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
- ***************
- *** 2186,2191 ****
- --- 2314,2320 ----
- endp++;
- }
- }
- + #endif /* CROSSATARI */
-
- /* Use LPATH like LIBRARY_PATH (for the CMU build program). */
- temp = getenv ("LPATH");
- ***************
- *** 2394,2399 ****
- --- 2523,2534 ----
- n_switches++;
- break;
- }
- + #ifdef atarist
- + case 'z': /* redirect stderr to a file */
- + zflag++;
- + n_switches++;
- + break;
- + #endif
- default:
- n_switches++;
-
- ***************
- *** 2413,2423 ****
- --- 2548,2569 ----
- (such as cpp) rather than those of the host system. */
- /* Use 2 as fourth arg meaning try just the machine as a suffix,
- as well as trying the machine and the version. */
- + #if (defined(atarist) || defined(CROSSATARI) || defined(WEIRD))
- + /* NB defined(WEIRD) should not really be there, its only for my weird setup */
- + /* We are not using machine_suffix here, so do not make */
- + /* these prefixes available only when we have one */
- + add_prefix (&exec_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
- + add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
- +
- + add_prefix (&startfile_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
- + add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
- + #else
- add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
- add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
-
- add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
- add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
- + #endif /* (defined(atarist) || defined(CROSSATARI)) */
-
- tooldir_prefix = concat (tooldir_base_prefix, spec_machine, "/");
-
- ***************
- *** 2637,2642 ****
- --- 2783,2797 ----
- /* Nonzero means that the input of this command is coming from a pipe. */
- static int input_from_pipe;
-
- + #ifdef atarist
- + /* I don't know why this is necessary. Recursive calls to do_spec_1
- + end up ignoring the error code from calls to execute(). That causes
- + do_spec to get a 0 return value, and do_spec_1("\n"), which causes the
- + command to get executed again.
- + */
- + int execute_return_error = 0;
- + #endif
- +
- /* Process the spec SPEC and run the commands specified therein.
- Returns 0 if the spec is successfully processed; -1 if failed. */
-
- ***************
- *** 2657,2666 ****
- --- 2812,2830 ----
-
- /* Force out any unfinished command.
- If -pipe, this forces out the last command if it ended in `|'. */
- + #ifdef atarist
- + if (!value && execute_return_error)
- + {
- + value = execute_return_error;
- + execute_return_error = 0;
- + }
- + #endif
- if (value == 0)
- {
- + #ifndef atarist
- if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
- argbuf_index--;
- + #endif
-
- if (argbuf_index > 0)
- value = execute ();
- ***************
- *** 2698,2703 ****
- --- 2862,2918 ----
- Otherwise, NL, SPC, TAB and % are special. */
- switch (inswitch ? 'a' : c)
- {
- + #if (defined(atarist) || defined(CROSSATARI))
- + /* this stuff added by jrd. if see '$', expect name of env var, delimited
- + by '$'. Find it's value, and subst it in.
- +
- + modified by ERS to only collect things that look like names; this
- + saves e.g. the -$ arg. to cpp from getting munged */
- +
- + case '$':
- + {
- + char varname[32]; /* should be enough */
- + char * value; /* deciphered value string */
- + char *temp;
- + int i;
- + extern char *getenv();
- +
- + for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
- + varname[i] = c;
- + varname[i] = '\0';
- + if (strlen(varname) > 0) /* ++jrb fix */
- + {
- + ++p; /* skip trailing '$' */
- + value = getenv(varname); /* ++jrb fix */
- + if (value)
- + { /* if value is a path, only consider 1'st component */
- + #ifdef atarist
- + if((temp = index(value, ',')) == NULL)
- + temp = index(value, ';');
- + #else
- + temp = index(value, ':');
- + #endif
- + if(temp != NULL)
- + {
- + char *t = (char *) alloca(strlen(value) + 1);
- + strcpy(t, value);
- + t[temp-value] = '\0';
- + do_spec_1(t, 0);
- + }
- + else
- + do_spec_1(value, 0);
- + }
- + else
- + do_spec_1(".", 0); /* a compleat kludge... */
- + }
- + else
- + {
- + obstack_1grow(&obstack, '$');
- + arg_going = 1;
- + }
- + }
- + break;
- + #endif /* atarist */
- case '\n':
- /* End of line: finish any pending argument,
- then run the pending command if one has been started. */
- ***************
- *** 2736,2741 ****
- --- 2951,2960 ----
- if (argbuf_index > 0)
- {
- value = execute ();
- + #ifdef atarist
- + if (!execute_return_error)
- + execute_return_error = value;
- + #endif
- if (value)
- return value;
- }
- ***************
- *** 3351,3363 ****
- --- 3570,3590 ----
- break;
-
- default:
- + #if 1 /* atarist */
- + fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
- + c, (p - spec - 1), spec);
- + #endif
- abort ();
- }
- break;
-
- + #ifndef atarist
- + /* on the atari it is important to preserve backslash in spec */
- + /* so just let it go into default case */
- case '\\':
- /* Backslash: treat next character as ordinary. */
- c = *p++;
- + #endif
-
- /* fall through */
- default:
- ***************
- *** 3634,3639 ****
- --- 3861,3867 ----
-
- /* On fatal signals, delete all the temporary files. */
-
- + #ifndef atarist
- static void
- fatal_error (signum)
- int signum;
- ***************
- *** 3645,3650 ****
- --- 3873,3879 ----
- so its normal effect occurs. */
- kill (getpid (), signum);
- }
- + #endif
-
- int
- main (argc, argv)
- ***************
- *** 3659,3664 ****
- --- 3888,3898 ----
- char *specs_file;
- char *p;
-
- + #ifdef atarist
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + programname = "gcc";
- + #else
- p = argv[0] + strlen (argv[0]);
- while (p != argv[0] && p[-1] != '/') --p;
- programname = p;
- ***************
- *** 3675,3686 ****
- --- 3909,3922 ----
- if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
- signal (SIGPIPE, fatal_error);
- #endif
- + #endif /* atarist */
-
- argbuf_length = 10;
- argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
-
- obstack_init (&obstack);
-
- + #if (!(defined(atarist) || defined(CROSSATARI)))
- /* Set up to remember the pathname of gcc and any options
- needed for collect. We use argv[0] instead of programname because
- we need the complete pathname. */
- ***************
- *** 3688,3693 ****
- --- 3924,3930 ----
- obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=")-1);
- obstack_grow (&collect_obstack, argv[0], strlen (argv[0])+1);
- putenv (obstack_finish (&collect_obstack));
- + #endif
-
- /* Choose directory for temp files. */
-
- ***************
- *** 3699,3704 ****
- --- 3936,3950 ----
-
- process_command (argc, argv);
-
- + #if (defined(atarist) || defined(CROSSATARI))
- + {
- + char *temp;
- +
- + if((temp = getenv ("GCCEXEC")))
- + add_prefix (&exec_prefix, temp, 0, 0, 0);
- + }
- + #endif
- +
- /* Initialize the vector of specs to just the default.
- This means one element containing 0s, as a terminator. */
-
- ***************
- *** 3706,3711 ****
- --- 3952,3961 ----
- bcopy (default_compilers, compilers, sizeof default_compilers);
- n_compilers = n_default_compilers;
-
- +
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + specs_file = 0;
- + #else
- /* Read specs from a file if there is one. */
-
- machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
- ***************
- *** 3715,3720 ****
- --- 3965,3971 ----
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
- read_specs (specs_file);
- + #endif
-
- /* If not cross-compiling, look for startfiles in the standard places. */
- /* The fact that these are done here, after reading the specs file,
- ***************
- *** 3752,3758 ****
- 0, 0, NULL_PTR);
- add_prefix (&startfile_prefix,
- concat (standard_exec_prefix,
- ! machine_suffix,
- standard_startfile_prefix),
- 0, 0, NULL_PTR);
- }
- --- 4003,4009 ----
- 0, 0, NULL_PTR);
- add_prefix (&startfile_prefix,
- concat (standard_exec_prefix,
- ! (machine_suffix)? machine_suffix : "",
- standard_startfile_prefix),
- 0, 0, NULL_PTR);
- }
- ***************
- *** 3787,3793 ****
- --- 4038,4050 ----
-
- if (verbose_flag)
- {
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
- + version_string, PatchLevel);
- + #else
- fprintf (stderr, "gcc version %s\n", version_string);
- + #endif
- if (n_infiles == 0)
- exit (0);
- }
- ***************
- *** 3835,3841 ****
- --- 4092,4103 ----
-
- input_basename = input_filename;
- for (p = input_filename; *p; p++)
- + #ifdef atarist
- + if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
- + /* allow both '\' and '/' with our new lib */
- + #else
- if (*p == '/')
- + #endif
- input_basename = p + 1;
-
- /* Find a suffix starting with the last period,
- ***************
- *** 3898,3903 ****
- --- 4160,4166 ----
- int i;
- int first_time;
-
- + #if (!(defined(atarist) || defined(CROSSATARI)))
- /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
- for collect. */
- putenv_from_prefixes (&exec_prefix, "COMPILER_PATH=");
- ***************
- *** 3928,3933 ****
- --- 4191,4197 ----
- }
- obstack_grow (&collect_obstack, "\0", 1);
- putenv (obstack_finish (&collect_obstack));
- + #endif
-
- value = do_spec (link_command_spec);
- if (value < 0)
- diff -rc gcc-2.5.0/getpwd.c /net/acae127/home/bammi/usr2/gcc/getpwd.c
- *** gcc-2.5.0/getpwd.c Tue Sep 21 17:35:41 1993
- --- /net/acae127/home/bammi/usr2/gcc/getpwd.c Fri May 21 08:35:37 1993
- ***************
- *** 14,20 ****
- BSD systems) now provides getcwd as called for by POSIX. Allow for
- the few exceptions to the general rule here. */
-
- ! #if !(defined (POSIX) || defined (USG) || defined (VMS))
- #include <sys/param.h>
- extern char *getwd ();
- #define getcwd(buf,len) getwd(buf)
- --- 14,20 ----
- BSD systems) now provides getcwd as called for by POSIX. Allow for
- the few exceptions to the general rule here. */
-
- ! #if !(defined (POSIX) || defined (USG) || defined (VMS) || defined(atarist) || defined(CROSSHPUX))
- #include <sys/param.h>
- extern char *getwd ();
- #define getcwd(buf,len) getwd(buf)
- ***************
- *** 48,58 ****
- if (!p && !(errno = failure_errno))
- {
- if (! ((p = getenv ("PWD")) != 0
- && *p == '/'
- && stat (p, &pwdstat) == 0
- && stat (".", &dotstat) == 0
- && dotstat.st_ino == pwdstat.st_ino
- ! && dotstat.st_dev == pwdstat.st_dev))
-
- /* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
- --- 48,61 ----
- if (!p && !(errno = failure_errno))
- {
- if (! ((p = getenv ("PWD")) != 0
- + #ifndef atarist
- && *p == '/'
- && stat (p, &pwdstat) == 0
- && stat (".", &dotstat) == 0
- && dotstat.st_ino == pwdstat.st_ino
- ! && dotstat.st_dev == pwdstat.st_dev
- ! #endif
- ! ))
-
- /* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
- diff -rc gcc-2.5.0/toplev.c /net/acae127/home/bammi/usr2/gcc/toplev.c
- *** gcc-2.5.0/toplev.c Wed Oct 20 17:14:48 1993
- --- /net/acae127/home/bammi/usr2/gcc/toplev.c Tue Oct 26 12:27:33 1993
- ***************
- *** 31,37 ****
-
- #include <sys/stat.h>
-
- ! #ifdef USG
- #undef FLOAT
- #include <sys/param.h>
- /* This is for hpux. It is a real screw. They should change hpux. */
- --- 31,37 ----
-
- #include <sys/stat.h>
-
- ! #if defined(USG) || defined(CROSSHPUX)
- #undef FLOAT
- #include <sys/param.h>
- /* This is for hpux. It is a real screw. They should change hpux. */
- ***************
- *** 41,49 ****
- --- 41,57 ----
- #undef FFS /* Some systems define this in param.h. */
- #else
- #ifndef VMS
- + #if (!(defined(atarist) || defined(atariminix)))
- #include <sys/time.h>
- #include <sys/resource.h>
- + #endif /* !(atarist || atariminix) */
- + #endif
- #endif
- +
- + #ifdef atariminix
- + #include <sys/times.h>
- + /* #include <minix/const.h>, avoid dragging this in */
- + #define HZ 60 /* this is the only thing needed from minix/const.h */
- #endif
-
- #include "input.h"
- ***************
- *** 61,66 ****
- --- 69,79 ----
- #include "bytecode.h"
- #include "bc-emit.h"
-
- + #ifdef atarist
- + long _stksize = -1L; /* for all sizes of ST's */
- + /* -1 means malloc from own heap and keep all of memory */
- + #endif /* atarist */
- +
- #ifdef VMS
- /* The extra parameters substantially improve the I/O performance. */
- static FILE *
- ***************
- *** 791,797 ****
- int
- get_run_time ()
- {
- ! #ifdef USG
- struct tms tms;
- #else
- #ifndef VMS
- --- 804,813 ----
- int
- get_run_time ()
- {
- ! #ifdef atarist
- ! long now;
- ! #else
- ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
- struct tms tms;
- #else
- #ifndef VMS
- ***************
- *** 806,816 ****
- } vms_times;
- #endif
- #endif
-
- if (quiet_flag)
- return 0;
-
- ! #ifdef USG
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
- #else
- --- 822,836 ----
- } vms_times;
- #endif
- #endif
- + #endif
-
- if (quiet_flag)
- return 0;
-
- ! #ifdef atarist
- ! return(time(NULL) * 1000000);
- ! #else
- ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
- #else
- ***************
- *** 823,828 ****
- --- 843,849 ----
- return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
- #endif
- #endif
- + #endif
- }
-
- #define TIMEVAR(VAR, BODY) \
- ***************
- *** 1460,1465 ****
- --- 1481,1487 ----
- longjmp (float_handler, 1);
- }
-
- + #ifndef atarist
- /* Handler for SIGPIPE. */
-
- static void
- ***************
- *** 1469,1474 ****
- --- 1491,1497 ----
- {
- fatal ("output pipe has been closed");
- }
- + #endif
-
- /* Strip off a legitimate source ending from the input string NAME of
- length LEN. */
- ***************
- *** 1522,1527 ****
- --- 1545,1551 ----
- putc ('\"', asm_file);
- }
-
- + #ifdef SYSV
- /* Output a file name in the form wanted by System V. */
-
- void
- ***************
- *** 1552,1557 ****
- --- 1576,1582 ----
- #endif
- #endif
- }
- + #endif
-
- /* Routine to build language identifier for object file. */
- static void
- ***************
- *** 1664,1670 ****
- --- 1689,1699 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".jump");
- + #else
- + strcat (dumpname, ".jmp");
- + #endif
- jump_opt_dump_file = fopen (dumpname, "w");
- if (jump_opt_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1686,1692 ****
- --- 1715,1725 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".loop");
- + #else
- + strcat (dumpname, ".lop");
- + #endif
- loop_dump_file = fopen (dumpname, "w");
- if (loop_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1697,1703 ****
- --- 1730,1740 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".cse2");
- + #else
- + strcat (dumpname, ".cs2");
- + #endif
- cse2_dump_file = fopen (dumpname, "w");
- if (cse2_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1708,1714 ****
- --- 1745,1755 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".flow");
- + #else
- + strcat (dumpname, ".flo");
- + #endif
- flow_dump_file = fopen (dumpname, "w");
- if (flow_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1719,1725 ****
- --- 1760,1770 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".combine");
- + #else
- + strcat (dumpname, ".cmb");
- + #endif
- combine_dump_file = fopen (dumpname, "w");
- if (combine_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1730,1736 ****
- --- 1775,1785 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".sched");
- + #else
- + strcat (dumpname, ".sch");
- + #endif
- sched_dump_file = fopen (dumpname, "w");
- if (sched_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1741,1747 ****
- --- 1790,1800 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".lreg");
- + #else
- + strcat (dumpname, ".lrg");
- + #endif
- local_reg_dump_file = fopen (dumpname, "w");
- if (local_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1752,1758 ****
- --- 1805,1815 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".greg");
- + #else
- + strcat (dumpname, ".grg");
- + #endif
- global_reg_dump_file = fopen (dumpname, "w");
- if (global_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1763,1769 ****
- --- 1820,1830 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".sched2");
- + #else
- + strcat (dumpname, ".sc2");
- + #endif
- sched2_dump_file = fopen (dumpname, "w");
- if (sched2_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1774,1780 ****
- --- 1835,1845 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".jump2");
- + #else
- + strcat (dumpname, ".jp2");
- + #endif
- jump2_opt_dump_file = fopen (dumpname, "w");
- if (jump2_opt_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1798,1804 ****
- --- 1863,1873 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".stack");
- + #else
- + strcat (dumpname, ".stk");
- + #endif
- stack_reg_dump_file = fopen (dumpname, "w");
- if (stack_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 2919,2930 ****
- --- 2988,3009 ----
- int version_flag = 0;
- char *p;
-
- + #ifdef atarist
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + #endif
- +
- /* save in case md file wants to emit args as a comment. */
- save_argc = argc;
- save_argv = argv;
-
- p = argv[0] + strlen (argv[0]);
- + #ifndef atarist
- while (p != argv[0] && p[-1] != '/') --p;
- + #else
- + while (p != argv[0] && ((p[-1] != '/') && (p[-1] != '\\') &&
- + (p[-1] != ':'))) --p;
- + #endif
- progname = p;
-
- #ifdef RLIMIT_STACK
- ***************
- *** 2941,2949 ****
- --- 3020,3030 ----
-
- signal (SIGFPE, float_signal);
-
- + #ifndef atarist
- #ifdef SIGPIPE
- signal (SIGPIPE, pipe_closed);
- #endif
- + #endif
-
- decl_printable_name = decl_name;
- lang_expand_expr = (struct rtx_def *(*)()) do_abort;
- ***************
- *** 3042,3047 ****
- --- 3123,3140 ----
- else if (!strcmp (str, "dumpbase"))
- {
- dump_base_name = argv[++i];
- + #ifdef atarist
- + /* dump_base_name will typically be 'foo.c' here.
- + Need to truncate at the '.', cause dots mean
- + something here
- + */
- + {
- + char * n = dump_base_name;
- + for ( ; ((*n) && (*n != '.')) ; )
- + n++;
- + *n = '\0';
- + }
- + #endif
- }
- else if (str[0] == 'd')
- {
- ***************
- *** 3473,3479 ****
- --- 3566,3578 ----
- option flags in use. */
- if (version_flag)
- {
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "%s version %s-atariST Patchlevel %s",
- + language_string, version_string, PatchLevel);
- + #else
- fprintf (stderr, "%s version %s", language_string, version_string);
- + #endif
- #ifdef TARGET_VERSION
- TARGET_VERSION;
- #endif
- ***************
- *** 3498,3503 ****
- --- 3597,3604 ----
- if (output_bytecode)
- bc_write_file (stdout);
-
- + #if (!(defined(atarist) || defined(atariminix)))
- + #if (!(defined(CROSSHPUX)))
- #ifndef OS2
- #ifndef VMS
- if (flag_print_mem)
- ***************
- *** 3516,3521 ****
- --- 3617,3624 ----
- }
- #endif /* not VMS */
- #endif /* not OS2 */
- + #endif
- + #endif
-
- if (errorcount)
- exit (FATAL_EXIT_CODE);
- ***************
- *** 3627,3629 ****
- --- 3730,3763 ----
-
- fprintf (stderr, "\n");
- }
- +
- + #ifdef atarist
- + void atari_output_filename(file, filename)
- + FILE *file;
- + char *filename;
- + {
- + if( (!file) || (!filename) ) return;
- + for(; *filename; filename++)
- + {
- + if(*filename == '\\') putc('\\', file);
- + putc(*filename, file);
- + }
- + }
- +
- + #include <string.h>
- +
- + char *atari_filename_nondirectory(p)
- + char *p;
- + {
- + char *s;
- +
- + for(s = p + strlen(p); s != p; --s)
- + {
- + if((*s == '/') || (*s == '\\'))
- + break;
- + }
- +
- + return (s == p) ? p : s+1;
- + }
- +
- + #endif
- diff -rc gcc-2.5.0/varasm.c /net/acae127/home/bammi/usr2/gcc/varasm.c
- *** gcc-2.5.0/varasm.c Thu Oct 21 13:14:24 1993
- --- /net/acae127/home/bammi/usr2/gcc/varasm.c Tue Oct 26 08:34:53 1993
- ***************
- *** 1354,1370 ****
- assemble_external_libcall (fun)
- rtx fun;
- {
- ! #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
- if (!output_bytecode)
- ! {
- ! /* Declare library function name external when first used, if nec. */
- if (! SYMBOL_REF_USED (fun))
- ! {
- ! SYMBOL_REF_USED (fun) = 1;
- ! ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
- ! }
- ! }
- #endif
- }
-
- /* Declare the label NAME global. */
- --- 1354,1370 ----
- assemble_external_libcall (fun)
- rtx fun;
- {
- ! /* Declare library function name external when first used, if nec. */
- if (!output_bytecode)
- ! {
- if (! SYMBOL_REF_USED (fun))
- ! {
- ! SYMBOL_REF_USED (fun) = 1;
- ! #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
- ! ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
- #endif
- + }
- + }
- }
-
- /* Declare the label NAME global. */
- ***************
- *** 2814,2819 ****
- --- 2814,2822 ----
- rtx x;
- {
- struct rtx_const val0, val1;
- +
- + if (XEXP (x, 0) == pc_rtx || XEXP (x, 1) == pc_rtx)
- + return XEXP (x, 0) == XEXP (x, 1) ? const0_rtx : x;
-
- decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
- decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
-